1. Field of the Invention
The present invention relates to the technology of data storage in a storage system, such as redundant array of inexpensive/independent disks (RAID). More particularly, the present invention relates to the management of the snapshot data in a storage system that utilizes the data snapshot copy technique.
2. Related Art
Nowadays, data storage and security are getting more and more important. Therefore, there are many modern developments in the storage media technology, where one of them is the invention of the RAID. Advantages of the RAID include better data storage efficiency and higher fault-tolerance, and the work load is distributed over many physical storage drives in a parallel manner, so that the better efficiency can be achieved. Through multiple manipulations of data, if one or several disk drive(s) or sector(s) has(have) problems, other disk drives can be used to re-construct the data through using the other disk drives, thereby achieving high fault-tolerance.
At present, one of the technologies, which has been implemented in the current storage systems, is the “snapshot.” Generally speaking, the so-called Snapshot-Volume refers to the status of a Base-Volume at a particular moment or the status of a Source-Volume at a particular moment. Consequently, the Snapshot-Volume can be said to be a backup image, i.e., the snapshot of the Base-Volume or Source-Volume.
The snapshot is usually accompanied by a copy-on-write procedure. That is, the snapshot copies original data in the target sector, not the data in the entire Base-Volume, into the Snapshot-Image sector only when data are written/updated. Therefore, the Snapshot-Volume at each moment consists of the corresponding Snapshot-Image and the data blocks in the Base-Volume, where the data blocks in the Base-Volume are not copied to the Snapshot-Image.
Please refer to FIGS. 1A to 1C. FIG. 1A shows the status of the Base-Volume at the moment when the Snapshot-Volume-A is formed. FIG. 1B shows that the data blocks 212, 216, 218 in the Base-Volume are updated. Therefore, before the updating, the DATA-B, DATA-E, and DATA-D originally stored in it are copied to the Snapshot-Image #A. The rest of data that are not updated are not copied. In other words, the Snapshot-Volume-A consists of the Snapshot-Image #A and the data blocks 210, 214 of the Base-Volume, where the data blocks 210, 214 are not copied to the Snapshot-Image #A, so that the data status in the Base-Volume of FIG. 1A is shown. Next, FIG. 1C shows the moment when the Snapshot-Volume-B is formed, and shows that the data blocks 214, 212 in the Base-Volume are updated. When performing the copy-on-write procedure for the data block 214, DATA-C in the data block 214 is copied to the Snapshot-Image #A and the Snapshot-Image #B. The data block 212 has been performed with the copy-on-write procedure and, thus, has been copied to the Snapshot-Image #A. It should be noted that though the data stored at that moment was DATA-B, only the currently existing data DATA-G in the data block 212 needs to be copied to the Snapshot-Image #B. As a result, the Snapshot-Volume-A consists of the Snapshot-Image #A and the data block 210 in the Base-Volume, where the data block 210 is not copied to the Snapshot-Image #A, so as to re-construct the data status of the Base Volume at that moment as shown in FIG. 1A. On the other hand, the Snapshot-Volume-B consists of the Snapshot-Image #B and the data blocks 210, 216, 218 in the Base-Volume, where the data blocks are not copied to the Snapshot-Image #B, so as to re-construct the data status of the Base-Volume at the moment as shown in FIG. 1B.
It is clear from the above descriptions that Snapshot-Volume at each moment consists of the Snapshot Image and the data blocks of the Base Volume, where the data blocks are not copied to the Snapshot-Image at the each moment. Therefore, when writing the data, the data in the data block are copied to all the Snapshot Images that do not have that copy of the data block. That is, in addition to the latest Snapshot-Image, the former Snapshot-Images must be checked individually in order to determine which Snapshot-Image(s) need(s) to perform the copy-on-write procedure, which is very complicated and time-consuming. Moreover, when there are more moments for setting or for starting snapshots, the stored snapshots become more humongous, which will cause the problems of insufficient storage space and of management. Therefore, how to effectively manage snapshot storage space in order to increase the work efficiency is a priority in the art.
Besides, for the communication protocols used in the traditional storage virtualization systems having snapshot function, only one type of HDDs can be used therein. The HDDs, however, have the problem that either the quality is good but price is high, or the price is inexpensive but the quality is poor. For example, a SCSI HDD is a high quality but also high price HDD, while a SATA HDD is an inexpensive but lower quality HDD. Nonetheless, source volume is the storage space which is used frequently, but snapshot volume is a storage space which is not used so frequent. If the source volume is stored in the HDDs of high quality or performance and the snapshot volume is stored in the HDDs of lower quality or performance, the price can be lower with little impact on the quality or performance of the system. If, however, two types of communication protocol interfaces are provided in the storage system for the purpose of using two types of HDDs of different protocols, the cost to design and manufacture the system will be increased largely. Therefore, how to effectively manage snapshot storage space and to take cost and efficiency into consideration is also a priority in the art.